// ========================================================================
// Copyright (c) 2022 ChangYou, All rights reserved.
// http://www.changyou.com/
// 
// Filename:    GPUInstancing_StackInstance.cs
// Time:        2022-08-22 21:13:17
// Author:      xiangjinbao
// Email:       xiangjinbao@cyou-inc.com
// Version:     v2022.0.1
// Description: GPUInstancing_StackInstance
// ========================================================================

using System.Collections.Generic;
using UnityEngine;

namespace ProjectTW.Foliage
{
    public class GPUInstancingStack
    {
        private readonly List<Matrix4x4> m_MatrixStash = new List<Matrix4x4>();
        private readonly List<Vector4> m_VectorStash = new List<Vector4>();

        public List<Matrix4x4> MatrixStash
        {
            get
            {
                return m_MatrixStash;
            }
        }

        public List<Vector4> VectorStash
        {
            get
            {
                return m_VectorStash;
            }
        }

        public void Clear()
        {
            m_MatrixStash.Clear();
            m_VectorStash.Clear();
        }

        public void Add(Matrix4x4 matrix, Vector4 worldPos)
        {
            m_MatrixStash.Add(matrix);
            m_VectorStash.Add(worldPos);
        }
    }
}
